/**
 * @description User表的模型
 * @author 印明帝
 */
const seq = require('../seq')
const { STRING,DECIMAL } = require('../types')

// 创建Users表
const User = seq.define('user',{
  userName: {
    type: STRING,
    allowNull: false,
    unique: true,
    comment: '用户名 唯一'
  },
  password: {
    type: STRING,
    allowNull: false,
    comment: '用户密码'
  },
  nickName: {
    type: STRING,
    allowNull: false,
    comment: '用户昵称'
  },
  gender: {
    type: DECIMAL,
    allowNull: false,
    defaultValue: 3,
    comment: '性别'
  },
  picture: {
    type: STRING,
    allowNull: true,
    comment: '头像'
  },
  city: {
    type: STRING,
    allowNull: true,
    comment: '所在城市'
  }
})

module.exports = User